import Base from '../../static/js/base'
class Setting extends Base{
	constructor() {
		super();
	}
	// 我的信息
	my(callBack) {
		var that = this;
		var params = {
		  url: 'login/my',
		  method:'POST',
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
	// 退出登录
	logout(callBack) {
		var that = this;
		var params = {
		  url: 'login/logout',
		  method:'DELETE',
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
	// 修改头像
	edit_avatar(id,setting_that,callBack) {
		var that = this;
		var params = {
		  url: 'my/edit_avatar',
		  method:'PUT',
		  that:setting_that,
		  data:{
			id:id  
		  },
		  sCallBack: function (res) {
			callBack && callBack(res.data);
		  }
		};
		that.request(params);
	};
}
export default Setting	